import {createRouter, createWebHistory} from 'vue-router'
import HomeView from '../views/HomeView.vue'


const routes = [
  {
    path: "/",
    redirect: '/login'
  },
  {
    path: '/login',
    name: "登录",
    component: import('../views/LoginView.vue'),
  },
  {
    path: '/home',
    component: HomeView,
    meta: {
      title: '首页',
    },
    children: [
      {
        path: '',
        name: 'homeWelcome',
        component: () => import('../components/home/right/WelcomeComponent.vue'),
        meta: {
          title: '首页',
        }
      },
      {
        path: 'Company',
        name: 'company',
        component: () => import('../components/home/right/CompanyComponent.vue'),
        meta: {
          title: '咨询师管理',
        }
      },
      {
        path: 'Role',
        name: 'role',
        component: () => import('../components/home/right/RoleComponent.vue'),
        meta: {
          title: '咨询收费管理',
        },
      },
      {
        path: 'article',
        name: 'article',
        component: () => import('../components/home/right/article_LY/Article.vue'),
        meta: {
          title: '文章管理',
        }
      },
      {
        path: 'shoucang',
        name: 'shoucang',
        component: () => import('../components/home/right/article_LY/Shoucang.vue'),
        meta: {
          title: '课程收藏',
        }
      },
      {
        path: 'kechengjiaoliu',
        name: 'kechengjiaoliu',
        component: () => import('../components/home/right/article_LY/Kechengjiaoliu.vue'),
        meta: {
          title: '课程交流',
        }
      },
      {
        path:'kechengwenti',
        name:'kechengwenti',
        component: () => import('../components/home/right/article_LY/kechengwentibiao.vue'),
        meta: {
          title: '课程问题',
        }
      },

      {
        path: 'announcement',
        name: 'announcement',
        component: () => import('@/components/home/right/audio_MD/Announcement.vue'),
        meta: {
          title: '公告管理',
        }
      },
      {
        path: 'audio',
        name: 'audio',
        component: () => import('@/components/home/right/audio_MD/Audio.vue'),
        meta: {
          title: '音频管理',
        }
      },
      {
        path: 'communication',
        name: 'communication',
        component: () => import('@/components/home/right/communication_GMQ/Communication.vue'),
        meta: {
          title: '私信管理',
        },
      },
      {
        path: 'member',
        name: 'member',
        component: () => import('@/components/home/right/communication_GMQ/Member.vue'),
        meta: {
          title: '会员管理',
        }
      },
      {
        path: 'consultant',
        name: 'consultant',
        component: () => import('@/components/home/right/consultant_TY/Consultant.vue'),
        meta: {
          title: '咨询师管理',
        }
      },
      {
        path: 'consultantFee',
        name: 'consultantFee',
        component: () => import('@/components/home/right/consultant_TY/ConsultantFee.vue'),
        meta: {
          title: '咨询收费管理',
        }
      },
      {
        path: 'consultantSpecialization',
        name: 'consultantSpecialization',
        component: () => import('@/components/home/right/consultant_TY/ConsultantSpecialization.vue'),
        meta: {
          title: '擅长领域管理',
        }
      },
      {
        path: 'consultantAppointment',
        name: 'consultantAppointment',
        component: () => import('@/components/home/right/consultant_TY/ConsultationAppointment.vue'),
        meta: {
          title: '咨询预约管理',
        }
      },
      {
        path: 'course',
        name: 'course',
        component: () => import('@/components/home/right/course_DYT/Course.vue'),
        meta: {
          title: '课程管理',
        }
      },
      {
        path: 'buyCourse',
        name: 'buyCourse',
        component: () => import('@/components/home/right/course_DYT/BuyCourse.vue'),
        meta: {
          title: '课程购买记录管理',
        }
      },
      {
        path: 'courseType',
        name: 'courseType',
        component: () => import('@/components/home/right/course_DYT/CourseType.vue'),
        meta: {
          title: '课程类型管理',
        }
      },
      {
        path: 'psychologyQuestion',
        name: 'psychologyQuestion',
        component: () => import('@/components/home/right/Psychology_ZY/PsychologyQuestion.vue'),
        meta: {
          title: '心理答疑管理',
        }
      },
      {
        path: 'psychologyKnowledge',
        name: 'psychologyKnowledge',
        component: () => import('@/components/home/right/Psychology_ZY/PsychologyKnowledge.vue'),
        meta: {
          title: '心理知识管理',
        }
      },
      {
        path: 'psychologyTest',
        name: 'psychologyTest',
        component:()=>import('@/components/home/right/Psychology_ZY/PsychologgyTest.vue'),
        meta: {
          title: '心理测试管理',
        }

      },

      {
        path: 'mine',
        name: 'mine',
        component: () => import('../components/home/right/MineComponent.vue'),
        children: [
          {
            path: '',
            name: 'mineInfo',
            component: () => import('../components/home/right/mine/InfoComponent.vue'),
          },
          {
            path: 'password',
            name: 'password',
            component: () => import('../components/home/right/mine/PasswordComponent.vue'),
          }
        ],
        meta: {
          title: '个人空间'
        },

      }

    ]
  },


]
const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});


export default router
